package com.css.dzj.dzjap.modules.executorinfo.service;

import com.css.dzj.dzjap.modules.executorinfo.entity.ApExecutorInfoEntity;
import com.querydsl.core.QueryResults;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 执法人员信息service层
 */
@Service
public interface ExecutorInfoService {

    /**
     * 分页查询执法人员信息
     */
    QueryResults<ApExecutorInfoEntity> getAllExecutorInfo(PageRequest pageRequest);
    /**
     * 直接查询所有人员信息
     */
    List<ApExecutorInfoEntity> selectAll();

    /**
     * 对外接口多条件查询执法人员信息
     * @param executorName
     * @param executorCharacter
     * @param executorArea
     * @param executorCategory
     * @return
     */
    List<ApExecutorInfoEntity> getSelectInfo(String executorName,
                                             String executorCharacter,
                                             String executorArea,
                                             String executorCategory);

    /**
     * 通过id查询导出的数据
     * @param ids
     * @return
     */
    List<ApExecutorInfoEntity> getIds(List<String>ids);
    /**
     * 通过ID查询执法人员信息
     * @param id
     * @return
     */
    ApExecutorInfoEntity getExecutorInfo(String id);

    /**
     * 新增执法人员信息
     * @param executorInfo
     * @return
     */
    String addExecutorInfo(ApExecutorInfoEntity executorInfo);

    /**
     * 根据ID逻辑删除执法人员信息
     * @param executorid
     * @return
     */
    boolean delExecutorInfo(String executorid);

    /**
     * 修改执法人员信息
     * @param apExecutorInfoEntity
     * @return
     */
    void updExecutorInfo(ApExecutorInfoEntity apExecutorInfoEntity);

    /**
     * 根据执法人员等级分页查询信息
     * @param executorLevel
     * @return
     */
    QueryResults<ApExecutorInfoEntity> findExecutorByLevel(String executorLevel,PageRequest pageRequest);


    /**
     * 根据执法人员等级查询执法人员列表
     * @param executorLevel
     * @return
     */
    List<ApExecutorInfoEntity> findExecutorByExecutorLevel(String executorLevel, HttpServletRequest request);

    /**
     * 多条件分页查询执法人员信息
     * @param pageable
     * @param executorName 姓名
     * @param executorCode 执法证号
     * @param executorOrganization 所属主体全称
     * @param executorLevel 职级
     * @param executorCharacter 性质
     * @return
     */
    QueryResults<ApExecutorInfoEntity> getListExecutorInfo(Pageable pageable, String executorName, String executorCode, String executorOrganization, String executorLevel,String executorCharacter);
}
